/*    */ package com.newcrm.webapi.sub;
/*    */ 
/*    */ import com.newcrm.bean.User;
/*    */ import com.newcrm.db.CompanyExtManager;
/*    */ import com.newcrm.exception.NotFoundException;
/*    */ import com.newcrm.util.Util;
/*    */ import com.newcrm.webapi.AbstractAction;
/*    */ import com.newcrm.webapi.AbstractHttpServlet;
/*    */ import java.io.IOException;
/*    */ import java.io.PrintWriter;
/*    */ import javax.servlet.ServletException;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import net.sf.json.JSONObject;
/*    */ 
/*    */ public class UpdateVOIPSystemSetting extends AbstractAction
/*    */ {
/*    */   public UpdateVOIPSystemSetting(AbstractHttpServlet servlet)
/*    */   {
/* 29 */     super(servlet);
/*    */   }
/*    */ 
/*    */   public void parse(HttpServletRequest request, HttpServletResponse response)
/*    */     throws IOException, ServletException, NotFoundException
/*    */   {
/* 39 */     response.setContentType("text/html;charset=utf-8");
/* 40 */     PrintWriter out = response.getWriter();
/* 41 */     JSONObject jsonObject = new JSONObject();
/*    */ 
/* 43 */     User user = super.getLoginUser(request);
/*    */ 
/* 46 */     String username = 
/* 47 */       Util.getURLParameter(request.getParameter("username"));
/* 48 */     String password = Util.getURLParameter(request.getParameter("pwd"));
/* 49 */     String ip = Util.getURLParameter(request.getParameter("ip"));
/*    */ 
/* 51 */     CompanyExtManager manager = new CompanyExtManager();
/*    */ 
/* 53 */     manager.update(4, username, 
/* 54 */       user.companyId, user.userId);
/* 55 */     manager.update(5, password, 
/* 56 */       user.companyId, user.userId);
/* 57 */     manager.update(6, ip, user.companyId, 
/* 58 */       user.userId);
/*    */ 
/* 60 */     jsonObject.put("error", "0");
/* 61 */     out.println(jsonObject);
/* 62 */     out.flush();
/* 63 */     out.close();
/*    */   }
/*    */ }

/* Location:           C:\E\referenceProject\CRM参考\qikebao\WEB-INF\lib\qikebao.jar
 * Qualified Name:     com.newcrm.webapi.sub.UpdateVOIPSystemSetting
 * JD-Core Version:    0.6.1
 */